// $ANTLR 3.4 C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g 2012-10-24 11:27:48

package PL.prac6;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class XMLParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "BARRA", "BLANCO", "CADENA", "COMENTARIO", "COMILLAS", "DIGITO", "EXCLAMACION", "GUIONES", "IGUAL", "LETRA", "MAYOR", "MENOR", "NUMERO", "PALABRA"
    };

    public static final int EOF=-1;
    public static final int BARRA=4;
    public static final int BLANCO=5;
    public static final int CADENA=6;
    public static final int COMENTARIO=7;
    public static final int COMILLAS=8;
    public static final int DIGITO=9;
    public static final int EXCLAMACION=10;
    public static final int GUIONES=11;
    public static final int IGUAL=12;
    public static final int LETRA=13;
    public static final int MAYOR=14;
    public static final int MENOR=15;
    public static final int NUMERO=16;
    public static final int PALABRA=17;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


    public XMLParser(TokenStream input) {
        this(input, new RecognizerSharedState());
    }
    public XMLParser(TokenStream input, RecognizerSharedState state) {
        super(input, state);
    }

    public String[] getTokenNames() { return XMLParser.tokenNames; }
    public String getGrammarFileName() { return "C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g"; }



    // $ANTLR start "entrada"
    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:12:1: entrada : bloque EOF ;
    public final void entrada() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:12:9: ( bloque EOF )
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:12:11: bloque EOF
            {
            pushFollow(FOLLOW_bloque_in_entrada41);
            bloque();

            state._fsp--;


            match(input,EOF,FOLLOW_EOF_in_entrada43); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "entrada"



    // $ANTLR start "bloque"
    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:13:1: bloque : etiquetaa linea etiquetac ;
    public final void bloque() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:13:8: ( etiquetaa linea etiquetac )
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:13:10: etiquetaa linea etiquetac
            {
            pushFollow(FOLLOW_etiquetaa_in_bloque50);
            etiquetaa();

            state._fsp--;


            pushFollow(FOLLOW_linea_in_bloque52);
            linea();

            state._fsp--;


            pushFollow(FOLLOW_etiquetac_in_bloque54);
            etiquetac();

            state._fsp--;


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "bloque"



    // $ANTLR start "linea"
    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:14:1: linea : ( PALABRA | atrib | bloque )* ;
    public final void linea() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:14:7: ( ( PALABRA | atrib | bloque )* )
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:14:9: ( PALABRA | atrib | bloque )*
            {
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:14:9: ( PALABRA | atrib | bloque )*
            loop1:
            do {
                int alt1=4;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==MENOR) ) {
                    int LA1_1 = input.LA(2);

                    if ( (LA1_1==PALABRA) ) {
                        alt1=3;
                    }


                }
                else if ( (LA1_0==PALABRA) ) {
                    int LA1_2 = input.LA(2);

                    if ( (LA1_2==IGUAL) ) {
                        alt1=2;
                    }
                    else if ( (LA1_2==MENOR||LA1_2==PALABRA) ) {
                        alt1=1;
                    }


                }


                switch (alt1) {
            	case 1 :
            	    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:14:10: PALABRA
            	    {
            	    match(input,PALABRA,FOLLOW_PALABRA_in_linea62); 

            	    }
            	    break;
            	case 2 :
            	    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:14:18: atrib
            	    {
            	    pushFollow(FOLLOW_atrib_in_linea64);
            	    atrib();

            	    state._fsp--;


            	    }
            	    break;
            	case 3 :
            	    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:14:24: bloque
            	    {
            	    pushFollow(FOLLOW_bloque_in_linea66);
            	    bloque();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "linea"



    // $ANTLR start "atrib"
    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:15:1: atrib : PALABRA IGUAL CADENA ;
    public final void atrib() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:15:7: ( PALABRA IGUAL CADENA )
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:15:9: PALABRA IGUAL CADENA
            {
            match(input,PALABRA,FOLLOW_PALABRA_in_atrib75); 

            match(input,IGUAL,FOLLOW_IGUAL_in_atrib77); 

            match(input,CADENA,FOLLOW_CADENA_in_atrib79); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "atrib"



    // $ANTLR start "etiquetaa"
    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:16:1: etiquetaa : MENOR PALABRA ( atrib )? MAYOR ;
    public final void etiquetaa() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:16:11: ( MENOR PALABRA ( atrib )? MAYOR )
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:16:13: MENOR PALABRA ( atrib )? MAYOR
            {
            match(input,MENOR,FOLLOW_MENOR_in_etiquetaa87); 

            match(input,PALABRA,FOLLOW_PALABRA_in_etiquetaa89); 

            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:16:27: ( atrib )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==PALABRA) ) {
                alt2=1;
            }
            switch (alt2) {
                case 1 :
                    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:16:27: atrib
                    {
                    pushFollow(FOLLOW_atrib_in_etiquetaa91);
                    atrib();

                    state._fsp--;


                    }
                    break;

            }


            match(input,MAYOR,FOLLOW_MAYOR_in_etiquetaa94); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "etiquetaa"



    // $ANTLR start "etiquetac"
    // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:17:1: etiquetac : MENOR BARRA PALABRA MAYOR ;
    public final void etiquetac() throws RecognitionException {
        try {
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:17:11: ( MENOR BARRA PALABRA MAYOR )
            // C:\\Users\\Jose\\workspace\\prac6\\src\\main\\java\\PL\\prac6\\XMLParser.g:17:13: MENOR BARRA PALABRA MAYOR
            {
            match(input,MENOR,FOLLOW_MENOR_in_etiquetac102); 

            match(input,BARRA,FOLLOW_BARRA_in_etiquetac104); 

            match(input,PALABRA,FOLLOW_PALABRA_in_etiquetac106); 

            match(input,MAYOR,FOLLOW_MAYOR_in_etiquetac108); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "etiquetac"

    // Delegated rules


 

    public static final BitSet FOLLOW_bloque_in_entrada41 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entrada43 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_etiquetaa_in_bloque50 = new BitSet(new long[]{0x0000000000028000L});
    public static final BitSet FOLLOW_linea_in_bloque52 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_etiquetac_in_bloque54 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PALABRA_in_linea62 = new BitSet(new long[]{0x0000000000028002L});
    public static final BitSet FOLLOW_atrib_in_linea64 = new BitSet(new long[]{0x0000000000028002L});
    public static final BitSet FOLLOW_bloque_in_linea66 = new BitSet(new long[]{0x0000000000028002L});
    public static final BitSet FOLLOW_PALABRA_in_atrib75 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_IGUAL_in_atrib77 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_CADENA_in_atrib79 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_MENOR_in_etiquetaa87 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_PALABRA_in_etiquetaa89 = new BitSet(new long[]{0x0000000000024000L});
    public static final BitSet FOLLOW_atrib_in_etiquetaa91 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_MAYOR_in_etiquetaa94 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_MENOR_in_etiquetac102 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_BARRA_in_etiquetac104 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_PALABRA_in_etiquetac106 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_MAYOR_in_etiquetac108 = new BitSet(new long[]{0x0000000000000002L});

}